package com.eastfair.builder.controller;

import com.eastfair.annotation.annotation.security.PreAuth;
import com.eastfair.core.base.R;
import com.eastfair.home.api.HomeExhibitionManageFeign;
import com.eastfair.home.dto.ExhibitionManageContactPageQuery;
import com.eastfair.home.vo.ExhibitionManageContactVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * <p>
 * 前端控制器
 * 展会联系人
 * </p>
 *
 * @author linan
 * @date 2022-10-22
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/exhibitionManageContact")
@Api(value = "ExhibitionManageContact", tags = "展会联系人")
@PreAuth(replace = "builder:exhibitionManageContact:")
public class BuilderExhibitionManageContactController {

    @Resource
    private HomeExhibitionManageFeign homeExhibitionManageFeign;

    /**
     * 查询展会联系人
     * @param params params
     * @return R<Boolean>
     */
    @PostMapping("/queryExhibitionContact")
    public R<List<ExhibitionManageContactVO>> queryExhibitionContact(@RequestBody ExhibitionManageContactPageQuery params){
        return  homeExhibitionManageFeign.queryExhibitionContact(params);
    }
}
